package main

import (
	"fmt"
	"time"
)

func main()  {
    timer:=time.NewTimer(5*time.Second)
    timer.Reset(time.Second)
    func(){
        <-timer.C
        fmt.Println("time arrive, stop")
	}()
}
func main01()  {
	fmt.Println("开始")
	timer:=time.NewTimer(3*time.Second)
	go func(){
		<-timer.C
		fmt.Println("可打印，3秒时间到")
	}()
	time.Sleep(5*time.Second)
	timer.Stop()
	for{

	}

}
